package com.example.demo.service.impl;

import com.example.demo.dao.ArticleInfoMapper;
import com.example.demo.entity.ArticleInfoVO;
import com.example.demo.service.ArticleInfoService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;
import java.util.Map;

/**
 * Created by admin on 2018/9/25.
 */
@Service
public class ArticleInfoServiceImpl implements ArticleInfoService {

    @Resource
    private ArticleInfoMapper articleInfoMapper;

    @Override
    public boolean addArticle(ArticleInfoVO articleInfoVO) {
        return articleInfoMapper.addArticle(articleInfoVO);
    }

    @Override
    public boolean deleteArticleById(Integer id) {
        return articleInfoMapper.deleteArticleById(id);
    }

    @Override
    public boolean updateArticle(ArticleInfoVO articleInfoVO) {
        return articleInfoMapper.updateArticle(articleInfoVO);
    }

    @Override
    public List<ArticleInfoVO> getArticleByName(String article_name) {
        return articleInfoMapper.getArticleByName(article_name);
    }

    @Override
    public List<Map<String, Object>> articleList(String label, String subLabel, String author, String beginTime, String endTime) {
        return articleInfoMapper.articleList(label, subLabel, author, beginTime, endTime);
    }
}
